﻿using System.Data.Entity.ModelConfiguration;
using ProjetoComperio.DataLayer.Entities;

namespace ProjetoComperio.DataLayer.Configuration
{
    public class CommentConfiguration : EntityConfiguration<Comment>
    {
        public CommentConfiguration()
        {
            Property(comment => comment.CommentID).IsIdentity();

            MapSingleType(comment => new
            {
                comment.CommentID,
                comment.Description,
                comment.UserName,
                comment.Email,
                comment.CreatedDate,
                comment.SubjectId
            }).ToTable("Comment");
        }
    }
}


